<template>
  <div>
    <!-- 面包屑 -->
    <el-breadcrumb separator="/" class="mb">
      <el-breadcrumb-item :to="{ path: '/welcome' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>
        <a>权限管理</a>
      </el-breadcrumb-item>
      <el-breadcrumb-item>权限列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>

    <el-table :data="list" style="width: 100%">
      <el-table-column type="index" label="#" width="80"></el-table-column>

      <el-table-column prop="authName" label="权限名称" width="280"></el-table-column>

      <el-table-column prop="path" label="路径"></el-table-column>

      <el-table-column label="权限等级">
        <template slot-scope="scope">
          <el-tag v-if="scope.row.level==0">一级  </el-tag>
          <el-tag v-if="scope.row.level==1" type="success">  二级</el-tag>
          <el-tag v-if="scope.row.level==2" type="danger">  三级</el-tag>
        </template>
      </el-table-column>
    </el-table>
    </el-card>

  </div>
</template>

<script>
import { getType } from "@/http/api";

export default {
  data() {
    return {
      list: [],
      tagType:["primay","success","waring"]
    };
  },
  created() {
   this.$axios.get('rights/list').then(res=>{
this.list=res.data.data
console.log(res);

   })
  
  }
};
</script>

<style lang="scss" scoped>
.mb{
    margin-bottom: 20px;
}

</style>